<!--top结束-->
<div class="mian">
	<div class="mian1">
		<div class="mian2">
			<!--left start-->
            <?php $this->load->view('defaults/common/left');?>
			<!--left end-->
			
			<!--right start-->
			<div class="right">
				<!--breadcrumb start-->
				<div class="righta"><?=$this->breadcrumb->generateHTML();?> </div>
				<!--breadcrumb end-->
				<!-- contents start -->
				<div id="contents">
				   <div id="ct_header">
						<table cellpadding="0" cellspacing="0" id="table_forms" border="1">
						    <tr>
						      <td ><?=lang('order_wxdh')?>：<?=$productFirst['maintain_id']?></td>
						    </tr>
						    <tr>
						      <td >
                                  <?=lang('product_cpid')?>：<?=$productFirst['product_id']?>&nbsp;&nbsp;
                                  <?=lang('product_lyid')?>：<?=$productFirst['source_product_id']?>&nbsp;&nbsp;&nbsp;&nbsp;
                                  退货单号：<?=$productFirst['weixiudan_order_id']?>
                              </td>
						    </tr>
                            <tr>
                                <td >
                                    <?=lang('product_cptype')?>：<?=$productFirst['sort_name']?>
                                </td>
                            </tr>
                            <?php if($productFirst['sort_id']==1 || $productFirst['sort_id']==2):?>
                              <tr>
                                  <td ><?=lang('product_sspp')?>：<?=$productFirst['brand_name']?>
                                      <?=$productFirst['other_brand_name']?>
                                  </td>
                              </tr>
                              <tr>
						      <td >
                                  <?=lang('product_cpxh')?>：<?=$productFirst['product_model']?>&nbsp;&nbsp;&nbsp;
                                  <?php if($productFirst['brand_id']==73): ?>
                                      颜色(color)：<?=$productFirst['color']?> &nbsp;&nbsp;
                                      内存(memory):<?=$productFirst['size']?>GB&nbsp;&nbsp;
                                  <?php endif; ?>
                                  SKU：<?=$productFirst['sku']?>&nbsp;&nbsp;&nbsp;
                                  IMEI：<?=$productFirst['imei']?>  <?php if($productFirst['warranty_start_date']){?>维保开始时间：<?=$productFirst['warranty_start_date']?>  维保结束时间：<?=$productFirst['warranty_end_date']?><?php }?>
                              </td>
						    </tr>
                            <?php elseif($product_sort_id==3):?>
                                <tr>
                                    <td >size：<?=$productFirst['size']?></td>
                                </tr>
                                <tr>
                                    <td >color：<?=$productFirst['color']?></td>
                                </tr>
                                <tr>
                                    <td >bluetooth：<?=$productFirst['is_bluetooth']?'YES':'NO'; ?></td>
                                </tr>
                                <tr>
                                    <td >remote control：<?=$productFirst['is_yaokong']?'YES':'NO'; ?></td>
                                </tr>
                            <?php endif;?>
						    <tr>
						      <td ><?=lang('product_wgzk')?>：<?=$productFirst['damage_name']?></td>
						    </tr>
                            <tr>
                                <td ><?=lang('product_zbtype')?>：
                                    <?php
                                    if(isset($productFirst['is_guarantee'])){
                                        switch($productFirst['is_guarantee']){
                                            case 2:
                                                echo lang('product_ppbn');
                                                break;
                                            case 1:
                                                echo lang('product_ptbn');
                                                break;
                                            case 0:
                                                echo lang('product_cpbw');
                                                break;
                                        }
                                    }
                                    ?>
                                </td>
                            </tr>
                            <tr>
                                <td ><?=lang('product_mssfyz')?>：<?=$productFirst['is_description']?'Yes':'No'?></td>
                            </tr>
                            <tr>
                                <td ><?=lang('product_zwbzkf')?>：<?=$productFirst['remark_cn']?></td>
                            </tr>
                            <tr>
                                <td ><?=lang('product_ywbzkf')?>：<?=$productFirst['remark_en']?></td>
                            </tr>
                            <tr>
                                <td ><?=lang('product_khbz')?>：<?=$productFirst['remark_customer']?></td>
                            </tr>
                            <tr>
                                <td ><?=lang('product_wxsbz')?>：<?=$productFirst['repair_remark']?></td>
                            </tr>
                            <tr>
                                <td >
                                    picture：<?=$productFirst['wgzkms']?>
                                </td>
                            </tr>
                            <tr>
                                <td ><?=lang('product_tjr')?>：<?=$productFirst['add_user']?></td>
                            </tr>
                            <tr>
                                <td ><?=lang('product_tjrq')?>：<?=$productFirst['add_time']?></td>
                            </tr>
                            <tr>
                                <td >
                                    <?php
                                        $photoPath = 'http://tomrepair.es/media/tickets/';
                                        $photos = unserialize($productFirst['photos']);
                                    ?>
                                    <?php if($photos): foreach ($photos as $val): ?>
                                        <a href="<?=$photoPath.$val?>" target="_blank" style="vertical-align: middle;">
                                            <img src="<?=$photoPath.$val?>" width="230">
                                        </a>
                                    <?php endforeach; endif; ?>
                                </td>
                            </tr>
					   </table>
				   </div>
                    <!-- 1 质检报告 展示开始 start -->
                    <?php if($qcReportFirst):?>
                    <div class="ct_content">
                        <p><span><?=lang('product_zjbgxq')?></span></p>
                        <table class="c_c_tables tbwd800" cellspacing="0">
                            <?php if($users['account']=='admin'):?>
                            <tr>
                                <td ><?=lang('order_wxdh')?>：<?=$qcReportFirst['oid']?></td>
                            </tr>
                            <tr>
                                <td ><?=lang('product_cpid')?>：<?=$qcReportFirst['pid']?></td>
                            </tr>
                            <tr>
                                <td ><?=lang('product_lyid')?>：<?=$qcReportFirst['source_product_id']?></td>
                            </tr>
                            <?php endif;?>
                            <tr>
                                <td ><?=lang('product_ppmc')?>：<?=$qcReportFirst['brand_name']?></td>
                            </tr>
                            <tr>
                                <td ><?=lang('product_cpxh')?>：<?=$qcReportFirst['product_model']?></td>
                            </tr>
                            <tr>
                                <td ><?=lang('product_mssfyz')?>：<?=$qcReportFirst['is_description']?'Yes':'No'?></td>
                            </tr>
                            <tr>
                                <td ><?=lang('product_wgzk')?>：<?=$qcReportFirst['damage']?></td>
                            </tr>
                            <tr>
                                <td ><?=lang('product_sjfj')?>：<?=$qcReportFirst['attachment']?></td>
                            </tr>
                            <tr>
                                <td ><?=lang('product_gz')?>：<?=$qcReportFirst['fault']?></td>
                            </tr>
                            <tr>
                                <td ><?=lang('product_wxx')?>：<?=$qcReportFirst['part']?></td>
                            </tr>
                            <tr>
                                <td ><?=lang('product_tjr')?>：<?=$qcReportFirst['add_user']?></td>
                            </tr>
                            <tr>
                                <td ><?=lang('public_cjrq')?>：<?=$qcReportFirst['add_time']?></td>
                            </tr>
                        </table>
                    </div>
                    <?php endif; ?>
                    <!-- 1 end -->

                    <!-- 列表展示开始List start -->
                    <?php if($wuliaoList):?>
                        <div class="ct_content">
                            <p><span><?=lang('product_wllb')?></span><span style="color: red">(红色表示没有库存！)</span></p>
                            <table class="c_c_tables tbwd800" cellspacing="0">
                                <thead>
                                <tr>
                                    <th>id</th>
                                    <th>sku</th>
                                    <th><?=lang('product_wlmc')?></th>
                                    <th><?=lang('product_wlsl')?></th>
                                    <th><?=lang('product_wljg')?></th>
                                    <th style="display: none;"><?=lang('product_wlcbjg')?></th>
                                    <th><?=lang('product_hbzl')?></th>
                                    <th><?=lang('product_tjr')?></th>
                                    <th><?=lang('product_tjrq')?></th>
                                </tr>
                                </thead>
                                <?php if($show_pages):?>
                                    <tfoot>
                                    <tr><th colspan="7" height="45"><?=$show_pages?> </th></tr>
                                    </tfoot>
                                <?php endif;?>
                                <tbody>
                                <?php foreach ($wuliaoList as $key=>$rs):?>
                                    <tr <?=$caofeini[$rs['sku']]=='yes'?"style='color: red'":""?>>
                                        <td><?=$rs['id']?></td>
                                        <td><?=$rs['sku']?></td>
                                        <td title="<?=$rs['accessory_name']?>" ><?=$rs['accessory_name']?></td>
                                        <td><?=$rs['accessory_quantity']?></td>
                                        <td><?=$rs['accessory_price']?></td>
                                        <td style="display: none;"><?=$rs['accessory_cost']?></td>
                                        <td><?=$rs['accessory_currency']?></td>
                                        <td><?=$rs['add_user']?></td>
                                        <td><?=$rs['add_time']?></td>
                                    </tr>
                                <?php endforeach;?>
                                </tbody>
                            </table>
                        </div>
                    <?php endif; ?>
                    <!-- 1列表展示开始List end -->

                    <!-- 2  start -->
                    <?php if($priceOneFirst):?>
                        <div class="ct_content">
                            <p><span><?=lang('product_bjdxq')?></span></p>
                            <table class="c_c_tables tbwd800" cellspacing="0">
                                <tr>
                                    <td ><?=lang('price_sgf')?>：<?=$priceOneFirst['maintain_price']?></td>
                                </tr>
                                <tr>
                                    <td ><?=lang('price_pjf')?>：<?=$priceOneFirst['accessory_price']?></td>
                                </tr>
                                <tr>
                                    <td ><?=lang('price_yf')?>：<?=$priceOneFirst['freight_price']?></td>
                                </tr>
                                <tr>
                                    <td ><?=lang('price_bjsbjfy')?>：<?=$priceOneFirst['no_accept_price']?></td>
                                </tr>
                                <tr>
                                    <td ><?=lang('price_sfjsbj')?>：
                                        <?php
                                            if($priceOneFirst['is_accept_price']===''){
                                                echo '/';
                                            }else{
                                                echo $priceOneFirst['is_accept_price']?'Yes':'No';
                                            }
                                        ?>
                                    </td>
                                </tr>
                                <tr>
                                    <td ><?=lang('price_hbzl')?>：<?=$priceOneFirst['price_sort']?></td>
                                </tr>
                                <tr>
                                    <td ><?=lang('public_clr')?>：<?=$priceOneFirst['add_user']?></td>
                                </tr>
                                <tr>
                                    <td ><?=lang('public_cjrq')?>：<?=$priceOneFirst['add_time']?></td>
                                </tr>
                            </table>
                        </div>
                    <?php endif; ?>
                    <!-- 2 end -->

				</div>
				<!-- contents end -->
			</div>
			<!--right end-->
            <div class="clear"></div>
		</div>
	</div>
</div>

